<?php

require_once 'Zend/Loader.php';

/**
 * Simple loader 
 * @author Alecsandru Gabriel DINU
 * @since Jun 12, 2008
 */
function __autoload($className) {
    if (class_exists('Zend_Loader', false)) {
		Zend_Loader::loadClass($className);
    } else {
        $file = str_replace('_', '/', $className) . '.php';
        if (!file_exists($file)) {
            throw new Exception('Cannot load class file ' . $className);
        } else {
            require_once $file;
        }
    }
}
